home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 23
/
Aminet 23 (1998)(GTI - Schatztruhe)[!][Feb 1998].iso
/
Aminet
/
text
/
edit
/
Smartindent.lha
/
Smartindent
/
Install
< prev
next >
Wrap
Text File
|
1997-12-14
|
3KB
|
169 lines
; $VER: 1.0 All rights reserved.
(run "c:version >env:_install_smartindent file api/smartindent.api" (safe))
(set smartver (getenv "_install_smartindent"))
(delete "env:_install_smartindent" (safe))
(complete 0)
(welcome (cat "\n"
"C-Code Smart Indention - " smartver "\n"
"©1997 Matthias Hopf <mshopf@informatik.uni-erlangen.de>\n"
"Published under the GNU copyleft\n"
"GoldED Release 4.7.2+ and C-Code setup (envCPP) required.\n"
))
(if (exists "GOLDED:" (NOREQ))
(
(set vernum (getversion "golded:golded"))
(set ver (/ vernum 65536))
(set rev (- vernum (* ver 65536)))
(set version (+ (* 10 ver) rev))
(if (< version 47)
(
(message "\nSorry, GoldED 4.7.2 or better required")
(exit (quiet))
)
)
(if (not (exists "golded:api"))
(makedir "golded:api")
)
; check whether API client is already installed
; (then the registry is probably installed, too)
(if (exists "golded:api/smartindent.api")
(
(set updatereg 0)
(set #updateregmsg (cat "\nUpdate registry?\n"
"As smartindent was already installed on your computer before, "
"your registry is prehaps already upto date.\n"))
)
(
(set updatereg 1)
(set #updateregmsg "\nUpdate registry?\n")
)
)
; install API clients
(copylib
(prompt "Install API client 'smartindent.api' ?")
(help @copylib-help)
(source "api/smartindent.api")
(dest "golded:api")
(confirm)
)
; install registry editor (if not yet installed)
(complete 20)
(if (not (exists "golded:tools"))
(makedir "golded:tools")
)
(if (not (exists "golded:tools/regedit"))
(makedir "golded:tools/regedit")
)
(copylib
(prompt "Install registry editor ?")
(source "bin/regedit" )
(dest "golded:tools/regedit")
(confirm)
(help @copylib-help)
)
; update registry
(complete 50)
(set updatereg (askchoice
(prompt #updateregmsg)
(choices
"No, do not update the registry"
"Yes, install the new C preferences!"
)
(default updatereg)
(help @askchoice-help)
))
(if (= updatereg 1)
(
(if (= @language "deutsch")
(set menu 1)
(set menu 0)
)
(set menu (askchoice
(prompt "\nSmartindent mouse menu\n")
(choices
"English"
"Deutsch"
)
(default menu)
(help @askchoice-help)
))
(complete 80)
(working "Updating registry...")
(if (= menu 0)
(run "golded:tools/regedit/regedit script=install_e.bat")
)
(if (= menu 1)
(run "golded:tools/regedit/regedit script=install_d.bat")
)
(set #done (cat "Installation complete. Please restart GoldED!\n"
"May be you now have two C-Code file types. In this case please remove "
"the one that is not listed at the top of the list.\n"
"May be you also have smartindent.api started twice. In this case please "
"remove one of these lines in the API configuration.\n"
"You may want to rearrange the mouse menu entries, too.\n"
))
)
(set #done "Installation complete. Please restart GoldED!\n")
)
(complete 100)
(user 2)
(message #done)
)
(message (cat "\n"
"Please install GoldED before attempting to\n"
"install this client. \n"
))
)
(exit (quiet))